package me.sdau.spider.manager.common.utils;

import me.sdau.spider.manager.modules.system.entity.User;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;

/**
 * @author zj
 * @date 2018/4/10 14:00
 */
public class SystemUtil {

    public static Subject getSubject() {
        return SecurityUtils.getSubject();
    }

    public static User getUser() {
        return (User) getSubject().getPrincipal();
    }
}
